import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/database/beans/member/card_list_bean_entity.dart';
import 'package:flutter/material.dart';


CardListBeanEntity $CardListBeanEntityFromJson(Map<String, dynamic> json) {
  final CardListBeanEntity cardListBeanEntity = CardListBeanEntity();
  final String? accountBalance = jsonConvert.convert<String>(json['accountBalance']);
  if (accountBalance != null) {
    cardListBeanEntity.accountBalance = accountBalance;
  }
  final String? accountBalanceInfo = jsonConvert.convert<String>(json['accountBalanceInfo']);
  if (accountBalanceInfo != null) {
    cardListBeanEntity.accountBalanceInfo = accountBalanceInfo;
  }
  final String? accountCode = jsonConvert.convert<String>(json['accountCode']);
  if (accountCode != null) {
    cardListBeanEntity.accountCode = accountCode;
  }
  final String? accountStatus = jsonConvert.convert<String>(json['accountStatus']);
  if (accountStatus != null) {
    cardListBeanEntity.accountStatus = accountStatus;
  }
  final String? accountType = jsonConvert.convert<String>(json['accountType']);
  if (accountType != null) {
    cardListBeanEntity.accountType = accountType;
  }
  final String? allocationBalance = jsonConvert.convert<String>(json['allocationBalance']);
  if (allocationBalance != null) {
    cardListBeanEntity.allocationBalance = allocationBalance;
  }
  final String? allocationBalanceInfo = jsonConvert.convert<String>(json['allocationBalanceInfo']);
  if (allocationBalanceInfo != null) {
    cardListBeanEntity.allocationBalanceInfo = allocationBalanceInfo;
  }
  final String? belongMchCode = jsonConvert.convert<String>(json['belongMchCode']);
  if (belongMchCode != null) {
    cardListBeanEntity.belongMchCode = belongMchCode;
  }
  final String? belongMchType = jsonConvert.convert<String>(json['belongMchType']);
  if (belongMchType != null) {
    cardListBeanEntity.belongMchType = belongMchType;
  }
  final String? cardName = jsonConvert.convert<String>(json['cardName']);
  if (cardName != null) {
    cardListBeanEntity.cardName = cardName;
  }
  final String? cardNo = jsonConvert.convert<String>(json['cardNo']);
  if (cardNo != null) {
    cardListBeanEntity.cardNo = cardNo;
  }
  final int? cardNoStatus = jsonConvert.convert<int>(json['cardNoStatus']);
  if (cardNoStatus != null) {
    cardListBeanEntity.cardNoStatus = cardNoStatus;
  }
  final String? categoryId = jsonConvert.convert<String>(json['categoryId']);
  if (categoryId != null) {
    cardListBeanEntity.categoryId = categoryId;
  }
  final String? categoryName = jsonConvert.convert<String>(json['categoryName']);
  if (categoryName != null) {
    cardListBeanEntity.categoryName = categoryName;
  }
  final String? categorySubId = jsonConvert.convert<String>(json['categorySubId']);
  if (categorySubId != null) {
    cardListBeanEntity.categorySubId = categorySubId;
  }
  final String? categorySubName = jsonConvert.convert<String>(json['categorySubName']);
  if (categorySubName != null) {
    cardListBeanEntity.categorySubName = categorySubName;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    cardListBeanEntity.createTime = createTime;
  }
  final bool? enableBuyExcludeOil = jsonConvert.convert<bool>(json['enableBuyExcludeOil']);
  if (enableBuyExcludeOil != null) {
    cardListBeanEntity.enableBuyExcludeOil = enableBuyExcludeOil;
  }
  final String? entityType = jsonConvert.convert<String>(json['entityType']);
  if (entityType != null) {
    cardListBeanEntity.entityType = entityType;
  }
  final String? giftBalance = jsonConvert.convert<String>(json['giftBalance']);
  if (giftBalance != null) {
    cardListBeanEntity.giftBalance = giftBalance;
  }
  final String? giftBalanceInfo = jsonConvert.convert<String>(json['giftBalanceInfo']);
  if (giftBalanceInfo != null) {
    cardListBeanEntity.giftBalanceInfo = giftBalanceInfo;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    cardListBeanEntity.id = id;
  }
  final int? isGroupUse = jsonConvert.convert<int>(json['isGroupUse']);
  if (isGroupUse != null) {
    cardListBeanEntity.isGroupUse = isGroupUse;
  }
  final int? isSubRecharge = jsonConvert.convert<int>(json['isSubRecharge']);
  if (isSubRecharge != null) {
    cardListBeanEntity.isSubRecharge = isSubRecharge;
  }
  final String? mchCode = jsonConvert.convert<String>(json['mchCode']);
  if (mchCode != null) {
    cardListBeanEntity.mchCode = mchCode;
  }
  final String? mchName = jsonConvert.convert<String>(json['mchName']);
  if (mchName != null) {
    cardListBeanEntity.mchName = mchName;
  }
  final String? mchNames = jsonConvert.convert<String>(json['mchNames']);
  if (mchNames != null) {
    cardListBeanEntity.mchNames = mchNames;
  }
  final String? prepayCardTemplateId = jsonConvert.convert<String>(json['prepayCardTemplateId']);
  if (prepayCardTemplateId != null) {
    cardListBeanEntity.prepayCardTemplateId = prepayCardTemplateId;
  }
  final String? rechargeBalance = jsonConvert.convert<String>(json['rechargeBalance']);
  if (rechargeBalance != null) {
    cardListBeanEntity.rechargeBalance = rechargeBalance;
  }
  final String? rechargeBalanceInfo = jsonConvert.convert<String>(json['rechargeBalanceInfo']);
  if (rechargeBalanceInfo != null) {
    cardListBeanEntity.rechargeBalanceInfo = rechargeBalanceInfo;
  }
  final String? templateRechargeStatus = jsonConvert.convert<String>(json['templateRechargeStatus']);
  if (templateRechargeStatus != null) {
    cardListBeanEntity.templateRechargeStatus = templateRechargeStatus;
  }
  final List<dynamic>? useMchCodes = (json['useMchCodes'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (useMchCodes != null) {
    cardListBeanEntity.useMchCodes = useMchCodes;
  }
  return cardListBeanEntity;
}

Map<String, dynamic> $CardListBeanEntityToJson(CardListBeanEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['accountBalance'] = entity.accountBalance;
  data['accountBalanceInfo'] = entity.accountBalanceInfo;
  data['accountCode'] = entity.accountCode;
  data['accountStatus'] = entity.accountStatus;
  data['accountType'] = entity.accountType;
  data['allocationBalance'] = entity.allocationBalance;
  data['allocationBalanceInfo'] = entity.allocationBalanceInfo;
  data['belongMchCode'] = entity.belongMchCode;
  data['belongMchType'] = entity.belongMchType;
  data['cardName'] = entity.cardName;
  data['cardNo'] = entity.cardNo;
  data['cardNoStatus'] = entity.cardNoStatus;
  data['categoryId'] = entity.categoryId;
  data['categoryName'] = entity.categoryName;
  data['categorySubId'] = entity.categorySubId;
  data['categorySubName'] = entity.categorySubName;
  data['createTime'] = entity.createTime;
  data['enableBuyExcludeOil'] = entity.enableBuyExcludeOil;
  data['entityType'] = entity.entityType;
  data['giftBalance'] = entity.giftBalance;
  data['giftBalanceInfo'] = entity.giftBalanceInfo;
  data['id'] = entity.id;
  data['isGroupUse'] = entity.isGroupUse;
  data['isSubRecharge'] = entity.isSubRecharge;
  data['mchCode'] = entity.mchCode;
  data['mchName'] = entity.mchName;
  data['mchNames'] = entity.mchNames;
  data['prepayCardTemplateId'] = entity.prepayCardTemplateId;
  data['rechargeBalance'] = entity.rechargeBalance;
  data['rechargeBalanceInfo'] = entity.rechargeBalanceInfo;
  data['templateRechargeStatus'] = entity.templateRechargeStatus;
  data['useMchCodes'] = entity.useMchCodes;
  return data;
}

extension CardListBeanEntityExtension on CardListBeanEntity {
  CardListBeanEntity copyWith({
    String? accountBalance,
    String? accountBalanceInfo,
    String? accountCode,
    String? accountStatus,
    String? accountType,
    String? allocationBalance,
    String? allocationBalanceInfo,
    String? belongMchCode,
    String? belongMchType,
    String? cardName,
    String? cardNo,
    int? cardNoStatus,
    String? categoryId,
    String? categoryName,
    String? categorySubId,
    String? categorySubName,
    String? createTime,
    bool? enableBuyExcludeOil,
    String? entityType,
    String? giftBalance,
    String? giftBalanceInfo,
    String? id,
    int? isGroupUse,
    int? isSubRecharge,
    String? mchCode,
    String? mchName,
    String? mchNames,
    String? prepayCardTemplateId,
    String? rechargeBalance,
    String? rechargeBalanceInfo,
    String? templateRechargeStatus,
    List<dynamic>? useMchCodes,
  }) {
    return CardListBeanEntity()
      ..accountBalance = accountBalance ?? this.accountBalance
      ..accountBalanceInfo = accountBalanceInfo ?? this.accountBalanceInfo
      ..accountCode = accountCode ?? this.accountCode
      ..accountStatus = accountStatus ?? this.accountStatus
      ..accountType = accountType ?? this.accountType
      ..allocationBalance = allocationBalance ?? this.allocationBalance
      ..allocationBalanceInfo = allocationBalanceInfo ?? this.allocationBalanceInfo
      ..belongMchCode = belongMchCode ?? this.belongMchCode
      ..belongMchType = belongMchType ?? this.belongMchType
      ..cardName = cardName ?? this.cardName
      ..cardNo = cardNo ?? this.cardNo
      ..cardNoStatus = cardNoStatus ?? this.cardNoStatus
      ..categoryId = categoryId ?? this.categoryId
      ..categoryName = categoryName ?? this.categoryName
      ..categorySubId = categorySubId ?? this.categorySubId
      ..categorySubName = categorySubName ?? this.categorySubName
      ..createTime = createTime ?? this.createTime
      ..enableBuyExcludeOil = enableBuyExcludeOil ?? this.enableBuyExcludeOil
      ..entityType = entityType ?? this.entityType
      ..giftBalance = giftBalance ?? this.giftBalance
      ..giftBalanceInfo = giftBalanceInfo ?? this.giftBalanceInfo
      ..id = id ?? this.id
      ..isGroupUse = isGroupUse ?? this.isGroupUse
      ..isSubRecharge = isSubRecharge ?? this.isSubRecharge
      ..mchCode = mchCode ?? this.mchCode
      ..mchName = mchName ?? this.mchName
      ..mchNames = mchNames ?? this.mchNames
      ..prepayCardTemplateId = prepayCardTemplateId ?? this.prepayCardTemplateId
      ..rechargeBalance = rechargeBalance ?? this.rechargeBalance
      ..rechargeBalanceInfo = rechargeBalanceInfo ?? this.rechargeBalanceInfo
      ..templateRechargeStatus = templateRechargeStatus ?? this.templateRechargeStatus
      ..useMchCodes = useMchCodes ?? this.useMchCodes;
  }
}